package cn.com.listentech;

public class LEDControlText {
//	 {
//		System.loadLibrary("ListenPlayDll");
//	}

    /**
     * 疑似发布到屏幕
     * @param handle
     * @param screeninfo
     * @return
     */
    public static  int SetScreenInfo(int handle,ScreenInfo screeninfo){
        return 1;
    }
    public static native int SetModuleInfo(int handle,ModuleInfo moduleinfo);//E卡 设置OE DA极性

    public static native int SetScanLineInfo(int handle,ScanLineInfo scanlineinfo);//E卡设置走线

    public static native int AddWaterFrame(int handle ,int pno ,int prgramno ,int qno ,int left ,int top ,int width ,int height ,int FrameID ,int FrameWidth ,int FrameStyle ,int   FrameMode ,int FrameStep ,int FrameSpeed ,int FrameColor ,int DispalyMode);

    /**
     * 添加节目
     * @param handle 会话句柄,StartSend返回值
     * @param jno 节目号
     * @param playTime 节目播放时间
     * @return
     * 1、成功
     * 2、参数错误
     */
    public static  int AddProgram(int handle,int jno,int playTime){
        return 1;
    }

    /**
     * 添加显示屏
     * @param handle 会话句柄,StartSend返回值
     * @param pno 屏号
     * @param DBColor 单双色(单色为1 ，双色为2,三基色3)
     * @return
     * 1、成功
     * 2、参数错误
     */
    public static  int AddControl(int handle,int pno,int DBColor){
        return 1;
    }

    public static native int SetSerialPortPara(int handle,int pno,int comno,int baud);

    public static native int AddLnTxtArea(int handle,int jno,int qno,int left,
                                          int top,int width,int height, String LnFileName,int PlayStyle,
                                          int Playspeed,int times);

    public static native int AddFileArea(int handle,int jno,int qno,int left,
                                         int top,int width,int height,int BackBit);

    public static native int AddFile(int handle,int jno,int qno,int mno,
                                     String fileName,int width,int height,int playstyle,
                                     int QuitStyle,int playspeed,int delay,int MidText);

    // 计时
    public static native int AddTimerArea(int handle,int jno,int qno,int left,
                                          int top,int width,int height,int fontColor, String fontName,
                                          int fontSize,int fontBold,int italic ,int underline,int mode,int dayshow,int culweek,
                                          int culday,int culhour,int culmin,int culse,int year,
                                          int week,int month,int day,int hour,int minute,int second);

    // 数字时钟
    public static native int AddDClockArea(int handle,int jno,int qno,int left,int top,int width,int height,
                                           int fontColor, String fontName,int fontSize,int fontBold,int Italic,int Underline,
                                           int year,int week,int month,int day,int hour,int minute,int second,int TwoOrFourYear,
                                           int HourShow,int format,int spanMode,int Advacehour,int Advaceminute);

    /**
     * 发送模式
     * 返回结果
     * 0：原因：1,没有添加节目2.若为网络发送，则端口被占用 3.若为串口发送则串口被占用或不存在
     * 1：发送成功
     * 2：通讯失败
     * 3：发送过程中出错
     * @param handle
     * @param SendType 1为普通 2为SD卡发送
     * @param hwd 窗口句柄 ,一般取0即可
     * @return
     */
    public static  int SendControl(int handle,int SendType,int hwd){
        return 1;
    }

    public static native int SetOrderPara(int handle, String diskName);

    public static native int AddFileString(int handle,int jno,int qno,int mno, String str,String fontname,int fontsize,int fontcolor,boolean bold,boolean italic,boolean underline,int align,int width,int height,int playstyle,int QuitStyle,int playspeed,int delay,int MidText);

    /**
     * @param handle 会话句柄,StartSend返回值
     * @param TransMode 传输模式   1 网口传输 2 串口传输
     * @param markrf 默认填为0.如果是rf通讯，填入1
     * @param controlType 型号。2是T系列，3是E，Q系列卡
     * @param pno 传入屏号值。
     * @return
     */
    public static  int SetTransMode(int handle,int TransMode,int markrf,int controlType,int pno){
        return 1;
    }

    public static  int SetNetworkPara(int handle,int pno, String ip,int port){
        return 1;
    }

    public static  int StartSend(){
        return 1;
    }

    public static native int SetProgramTimer(int handle,int pno,int jno,int TimingModel,int WeekSelect,
                                             int startSecond,int startMinute,int startHour,int startDay,int startMonth,int startWeek,int startYear,
                                             int endSecond,int endMinute,int endHour,int endDay,int endMonth,int endWeek,int endYear);

    public static native int AddLnTxtString(int handle,int jno,int qno,int left,int top,int width,int height,String str,String fontname,int fontsize,int fontcolor,boolean bold,boolean italic,boolean underline,int PlayStyle,int Playspeed,int times);

    /**
     * @param handle
     * @param jno			节目号 (>=1)
     * @param qno			区域号 (>=1)
     * @param left			区域左上角顶点x坐标：8的倍数，单位：象素
     * @param top			区域左上角顶点y坐标
     * @param width			区域宽度：8的倍数，单位：象素
     * @param height		区域高度
     * @param FontColor		字体颜色 颜色的RGB值，如红色为 ：255
     * @param fontName		字体名
     * @param fontSize		字体号
     * @param fontBold		字体粗细	0：不加粗 1：加粗
     * @param Italic		斜体
     * @param Underline		下划线
     * @param text			显示字符串
     * @return
     */
    public static  int AddQuitText(int handle,int jno,int qno,int left,int top,int width,int height,int FontColor,String fontName,int fontSize,boolean fontBold,boolean Italic,boolean Underline,String text){
        System.out.println(text);
        return 1;
    }

    public static native int SetTest(int handle,int value);

    public static native int  AdjustTime(int handle,int wnd);

    public static native int SetPower(int handle,int power) ;

    public static native int SetHardPara(int handle,int Mirror,int ScanStyle,int LineOrder,int cls,int RGChange,int zhangKong,int hwnd);



    public static native int SearchController(int handle,String filePath,boolean broadcast,int value);

    public static native int SetRemoteNetwork(int handle,String macAddress, String ip, String gateway,String subnetmask,String newmac,String newip,String newgateway,String newsubnetmask);

    public static native int SetPowerTimer(int handle,int bTimer,
                                           int startHour1,int startMinute1,int endHour1,int endMinute1,
                                           int startHour2,int startMinute2,int endHour2,int endMinute2,
                                           int startHour3,int startMinute3,int endHour3,int endMinute3,int hwnd);

    public static native int SetBrightnessTimer(int handle,int bTimer,
                                                int startHour1,int startMinute1,int endHour1,int endMinute1,int brightness1,
                                                int startHour2,int startMinute2,int endHour2,int endMinute2,int brightness2,
                                                int startHour3,int startMinute3,int endHour3,int endMinute3,int brightness3);

    public static native int SendScreenPara(int handle,int DBColor,int width,int height) ;

    public static native int SetTimingLimit(int handle,int FSecond,int FMinute,int FHour,int FDay,int FMonth,int FWeek,int FYear,int compo,boolean enable);

    public static native int  CancelTimingLimit(int handle);

    /**
     * 结束通讯会话
     * @param handle
     * @return
     * 1：成功
     * 2：不成功
     */
    public static  int  EndSend(int handle){
        return 1;
    }


    public static native int AddNeiMaTxtArea(int handle ,int jno,int qno,int left,int top,int width,int
            height,String showtext,int ShowStyle,int fontname,int fontcolor,int fontsize,int PlayStyle,int
                                                     QuitStyle,int Playspeed,int times);



}